﻿using ML.Entity;

namespace ML.IRepository
{
    public interface IUserRepository : IBaseRepository<UserEntity>
    {
        Pager<UserEntity> List(UserSearch userSearch);

        UserEntity Login(string login_name_in, string user_pwd_in);

        UserEntity GetByOpenId(string openid);

        /// <summary>
        /// 根据邀请code获取用户信息
        /// </summary>
        /// <param name="invitationcode">邀请code</param>
        /// <returns></returns>
        UserEntity getByInvitationCode(string invitationcode);

        bool AddUser(UserEntity userEntity, UserInvitationEntity userInvitationEntity);

        bool UpdateUser(UserEntity entity);
    }
}